@import 'variables.less';
@import 'grid.less';
@import 'fonts.less';

@import 'ui.less';
@import 'includes/mixins.less';
@import 'includes/kbox.less';
@import 'includes/notifications.less';

.fonts();

a,
a:link,
a:visited {
  color: @textBlue;
  text-decoration: none;
}

a:hover {
  color: @textDarkBlue;
  text-decoration: underline;
}

a.new {
  // These are links to nonexistant wiki pages.
  color: #d15646;
}

sup sup,
sub sub,
small small {
  bottom: 0;
  font-size: 100%;
  position: relative;
  top: 0;
  vertical-align: baseline;
}

article {
  a:visited {
    color: @textVisited;
  }
}

html, body {
  height: 100%;
}

body {
  color: @darkestGrey;
  font-family: @OpenSans;
  min-width: 1000px;
  text-align: left;

  display: flex;
  flex-direction: column; // for sticky footer

  &.html-rtl {
    margin: 0;
    padding: 0;
    text-align: right;

    > header .logo {
      padding-right: 30px;
    }

    &.scroll-header:not(.lock-body) {
      > header {
        .logo {
          padding-right: 10px;
        }

        #support-search {
          left: 0;
          padding-left: 10px;
          right: auto;

          .searchbox {
            padding-left: 36px;
          }

          .submit-button {
            left: 18px;
          }
        }
      }
    }

    .search-form-large {
      .searchbox {
        padding-left: 0;
        padding-right: 20px;
      }
      .submit-button {
        left: 140px;
      }
    }
  }

  > header {
    background: #000;
    position: relative;

    #aux-nav,
    #aux-nav-right {
      display: flex;
      align-items: center;
    }

    #aux-nav {
      padding: 16px 0 16px 20px;
    }

    #aux-nav-right {
      padding: 16px 20px 16px 0;
    }

    #support-search {
      display: none;
    }

    .logo {
      background: url('../img/mozilla-support-white.svg') top left no-repeat;
      background-size: 112px 48px;
      background-position: center;
      float: left;
      margin: 16px 0 16px 30px;
      position: relative;

      a {
        display: block;
        height: 48px;
        width: 112px;
      }
    }
  }

  &.scroll-header:not(.lock-body) {
    padding-top: 100px;

    > header {
      background: #000;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
      min-height: 50px;
      max-height: 50px;
      position: fixed;
      top: -100px;
      transform: translateY(100px);
      transition: transform .3s;
      width: 100%;
      z-index: 97;

      .logo {
        background-size: 90px 36px;
        height: 36px;
        margin-left: 10px;
        margin-top: 6px;
        margin-right: 30px;
        width: 90px;

        a {
          display: block;
          height: 36px;
          width: 90px;
        }
      }

      #aux-nav,
      #aux-nav-right {
        > ul {
          margin-top: 4px;

          .dropdown {
            display: none;
          }

          .firefox-download-button {
            display: none;
          }

          .signin-signup-button {
            display: none;
          }

          > li {
            display: inline-block;

            > a:link,
            a:visited, {
              color: #fff;
            }

            > a:hover {
              color: #dfdfdf;
            }

            > a:active {
              color: #b7b7b7;
            }
          }
        }
      }

      #aux-nav {
        padding-bottom: 0;
        padding-top: 0;
        height: 44px;
      }

      #aux-nav-right {
        padding-bottom: 0;
        padding-top: 0;

        svg {
          width: 24px;
        }

        .locale-picker {
          padding-left: 44px;
          font-weight: bold;

          &:hover {
            text-decoration: none;
            color: #dfdfdf;
          }
          &:active {
            color: #b7b7b7;
          }
        }
      }

      #support-search {
        display: block;
        margin-right: 10px;
        margin-top: 10px;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 99;

        .searchbox {
          border: 0;
          box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.5);
        }

        .submit-button {
          top: 7px;
          right: 17px;
        }
      }
    }
  }

  .html-rtl {
    header {
      .logo {
        float: right;
      }
    }

    #aux-nav-right .locale-picker {
      padding-left: 0;
      padding-right: 44px;
    }
  }
}

body,
html {
  background: @background;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}


#main-content {
  margin-top: 30px;
}

.nav-flex {
  display: flex;

  .push-right {
    margin-left: auto;
  }
}

.html-rtl {
  .nav-flex .push-right {
    margin-left: 0;
    margin-right: auto;
  }

  #aux-nav-right > ul > li {
    > a.locale-picker {
      padding-left: 5px;
      padding-right: 0;
      margin: 0 0 0 20px;

      @media screen and (min-width: 970px) {
        padding-left: 0;
      }
    }

    > svg {
      position: relative;
      margin: 1px 20px 0 -11px;
      padding: 0;
      display: inline-block;

      @media screen and (min-width: 970px) {
        margin: 0 20px 0 10px;
      }
    }
  }
}

#main-container {
  margin-bottom: 100px;
}

footer {
  background: #000;
  font-size: 16px;
  line-height: 1.3;
  margin: auto 0 0 0;
  padding: 45px 0 10px 0;
  text-align: left;

  a:link,
  a:visited {
    color: #fff;
    text-decoration: none;
  }

  a:hover,
  a:focus,
  a:active {
    color: #fff;
    text-decoration: underline;
  }

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  li {
    margin: 0 0 .8em;
  }

  h5 {
    font-size: 18px;
    font-family: @OpenSans;
    font-weight: bold;
    margin: 1em 0 .9em 0;

    @media screen and (min-width: 970px) {
        margin-top: 0;
    }
  }

  .footer-logo {
      width: 100px;

      @media screen and (max-width: 959px) {
        margin-left: -10px;
      }
  }

  .fineprint {
    color: #fff;
    font-size: 12px;
    line-height: 160%;
    font-weight: bold;
    padding-top: 20px;
    border-top: 2px solid white;

    a:link,
    a:visited {
      color: @textBlue;
    }

    @media screen and (min-width: 970px) {
      font-weight: normal;
      padding-top: 0;
      border-top: 0 none;

      a:link,
      a:visited {
        color: #9b9b9b;
      }
    }
  }

  .language-picker {
    color: #fff;
    font-size: 12px;
    padding-top: 20px;
    margin-bottom: 20px;

    a:link,
    a:visited {
      padding-left: 8px;
      color: @textBlue;

      @media screen and (min-width: 970px) {
        color: #9b9b9b;
      }
    }
  }

  .small-links {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 12px;

    li {
      display: inline;
      padding-right: 20px;

      &:last-child {
        padding-right: 0;
      }
    }

    a:link,
    a:visited {
      font-weight: bold;
      color: @textBlue;

      @media screen and (min-width: 970px) {
        color: #9b9b9b;
        font-weight: normal;
      }
    }
  }

  .social-links {
    margin: 2em 0 0;

    li {
      display: inline-block;
      margin-right: 20px;

      a {
        display: block;
        .image-replaced;
        background-image: url('/static/sumo/img/social-icon-sprite.svg');

        &.twitter {
          background-position: 0 0;
          width: 18px;
          height: 15px;
        }

        &.instagram {
          background-position: 0 -25px;
          width: 19px;
          height: 19px;
        }

        &.youtube {
          background-position: 0 -54px;
          width: 19px;
          height: 13px;
        }

        &.facebook {
          background-position: 0 -77px;
          width: 10px;
          height: 19px;
        }
      }
    }
  }
}

.html-rtl {
  footer {
    text-align: right;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: @ZillaSlab;
  font-weight: bold;
  color: #000;
}

h1 {
  font-size: 36px;
}

h3 {
  font-size: 16px;
}

ul.errorlist {
  color: @warning;
  background: lighten(@warning, 30%);
  border: 1px solid darken(@warning, 20%);
  border-radius: 2px;
  padding: 10px 10px 10px 30px;

  a, a:hover, a:active, a:visited {
    color: @warning;
  }
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
textarea,
select {
  display: block;
  background: #fff;
  border: 1px solid #b1b1b3;
  border-radius: 2px;
  box-shadow: none;
  transition: all linear .1s;
  padding: 12px 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;

  &:focus {
    border-color: #222;
  }
}

textarea {
  height: 110px;
}

select {
  position: relative;

  &:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86.3 43.1'%3E%3Cpolygon points='86.3,0 43.1,43.1 0,0 '/%3E%3C/svg%3E%0A");
    background-color: transparent;
    background-position: top 16px right 14px;
    background-repeat: no-repeat;
    background-size: 12px 12px;
  }

  &#id_involved_from_month {
    display: inline-block;
    width: ~"calc(60% - 15px)";
    margin-right: 10px;
  }

  &#id_involved_from_year {
    display: inline-block;
    width: 40%;
  }
}

.html-rtl select {
  background-position: top 20px left 14px;
}

.warning-link {
  &,
  &:link,
  &:visited {
    color: @warning;
    text-decoration: underline;
  }

  &:hover {
    color: darken(@warning, 20%);
    text-decoration: none;
  }
}

.helptext {
  margin-top: 10px;
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: @textLightGrey;

  &.below-inline-label {
    margin-top: -10px;

    @media screen and (min-width: 970px) {
      padding-left: 150px;
    }
  }
}

form .submit {
  padding: 40px 0;
  text-align: center;
  display: flex;
  flex-direction: column;

  .button {
    margin-right: auto;
    margin-left: auto;
  }

  .button + .button {
    margin-top: 20px;
  }

  @media screen and (min-width: 970px) {
    text-align: left;
    flex-direction: row;

    .button {
      margin-right: 0;
      margin-left: 0;
    }

    .button + .button {
      margin-top: 0;
    }
  }
}


.section-break {
  border: none;
  border-top: 2px solid #000;
  margin: 60px 0;
}

.manage-account {
  margin: 2em 0;
}

.edit-profile-avatar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  font-weight: bold;

  .avatar-preview {
    width: 100%;
    display: block;
    max-width: 400px;
    margin: 0 auto 10px;
  }

  @media screen and (min-width: 440px) {
    align-items: center;

    .avatar-preview {
      width: 120px;
      height: 120px;
      margin: 0 30px 0 0;
    }

    > a {
      margin-right: 30px;
    }
  }

  .remove-avatar {
    margin-left: auto;
  }
}

.avatar-wrap {
  display: flex;
  flex-direction: column;
  padding: 30px 0 20px;

  @media screen and (min-width: 480px) {
    flex-direction: row;
    align-items: flex-start;
  }
}

// .user-details {}
.avatar-preview {
  position: relative;
  margin: 0 0 20px;
  width: 100%;
  height: auto;

  .avatar {
    display: block;
    width: 100%;
  }

  @media screen and (min-width: 480px) {
    width: 170px;
    height: 170px;
    margin: 0 20px 0 0;
    padding-bottom: 0;
  }
}

/* buttons styled to look like links */
button[type="submit"],
input[type="submit"]{
  &.link-btn {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: @textBlue;
    cursor: pointer;
    font-weight: normal;
    padding: 0;
    text-align: left;
    white-space: normal;

    &:hover {
      box-shadow: none;
      text-decoration: underline;
    }
  }
}

.breadcrumbs {
  background: #e5eaed url('../img/grain.png');
  border-color: #dbe0e3 #dbe0e3 #f5f7f9 #dbe0e3;
  border-style: solid;
  border-width: 1px;
  font-weight: 600;
  padding: 4px 4px 5px 4px;
  position: relative;
  z-index: 1;

  &:after {
    background: #dbe0e3;
    bottom: 0;
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
    z-index: -1;
  }

  &:before {
    border: 2px solid rgba(0, 0, 0, 0.01);
    bottom: 1px;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
  }

  #breadcrumbs {
    color: #000;
    font-size: 12px;
    list-style: none;
    padding: 0;
    text-transform: uppercase;

    > li {
      float: left;
      margin: 0 16px 0 0;

      &:before {
        color: #7f7f7f;
        content: ' \003E ';
        margin: 0 16px 0 0;
      }

      &:first-of-type {
        &:before {
          content: '';
          margin: 0;
        }
      }
    }

    a,
    a:visited {
      color: #7f7f7f;
    }

    a:hover {
      color: #000;
      text-decoration: none;
    }
  }
}

.rgba {
  .breadcrumbs {
    @dark: rgba(0, 0, 0, 0.03);
    @light: rgba(255, 255, 255, 0.5);
    border-color: @dark @dark @light @dark;

    &:after {
      background: @dark;
    }
  }
}

.card-grid {
  list-style: none;
  margin: 0 -10px 20px -10px;
  padding: 0;

  > li {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 0 8px 20px;
    padding: 1px;
    position: relative;
    vertical-align: top;
    width: 298px;
    word-wrap: break-word;
    z-index: 1;

    &:before {
      background: #fff;
      border-radius: 5px;
      bottom: 1px;
      content: '';
      left: 1px;
      position: absolute;
      right: 1px;
      top: 1px;
      z-index: -1;
    }

    > a {
      display: block;
      padding: 20px;
    }
  }
}

.grid_9 {
  .card-grid {
    > li {
      width: 218px;

      > a {
        padding: 20px 15px;
      }
    }
  }
}

.no-generatedcontent {
  .card-grid {
    > li {
      background: #ccc;
      border: 1px solid #ccc;
      padding: 0;
    }
  }
}

.content-box {
  background: #fff;
  padding: 40px 30px;
}

.feature-box {
  background: #000;
  border: 1px solid #000;
  color: #fff;
  margin: 0 0 20px 0;
  padding: 10px 30px;
  position: relative;
  z-index: 1;

  h1 {
    font-size: 22px;
    margin: 0 0 10px 0;

    &:not(:first-of-type) {
      border-top: 1px dotted @borderLightGrey;
      margin-top: 20px;
      padding: 10px 0 0 0;
    }
  }

  p {
    margin: 10px 0;
  }
}

.folding-section,
[data-ui-type="folding-section"] {
  > header {
    cursor: pointer;
    position: relative;

    &:after {
      background: @iconsSprite -50px -396px no-repeat;
      content: '';
      height: 16px;
      left: auto;
      margin: -8px 0 0 0;
      position: absolute;
      right: 0;
      top: 50%;
      width: 16px;
    }
  }

  &.collapsed {
    > header {
      &:after {
        background-position: -50px -282px;
        margin-top: -10px;
        top: 50%;
      }
    }

    > section {
      display: none;
    }
  }
}

.folding-section {
  background: #000;

  > header {
    padding: 16px 20px;
    text-transform: uppercase;

    &:after {
      left: auto;
      margin: 0;
      right: 16px;
      top: 18px;
    }
  }

  > section {
    padding:0 20px 16px 20px;
  }

  &.collapsed {
    > header {
      &:after {
        margin: 0;
        top: 16px;
      }
    }
  }
}

.highlight-box {
  background: #fff;
  margin: 40px 0;
  padding: 30px;
}

.icon-locked {
  background: @iconsSprite -51px -1327px no-repeat;
  height: 14px;
  width: 14px;
}

.icon-sticky {
  background: @iconsSprite -51px -1443px no-repeat;
  height: 14px;
  width: 14px;
}

.icon-search {
  background: url('../img/icons-sprite.png') -50px -49px no-repeat;
  height: 19px;
  width: 19px;
}

.icon-back {
  background: url('../img/icons-sprite.png') -49px -1791px no-repeat;
  height: 14px;
  width: 18px;
}

.logo-sprite {
  background-position: 50% 50%;
  background-repeat: no-repeat;
  height: 96px;
  width: 96px;

  &.sumo {
    background-image: url('../img/sumo-icon.png');
  }

  &.small {
    height: 48px;
    width: 48px;

    &.sumo {
      background-image: url('../img/sumo-icon-small.png');
    }
  }

  &.large {
    background-size: 189px 96px;
    width: 189px;
  }
}

.nomargin {
  margin: 0 !important;
}

.nopadding {
  padding: 0 !important;
}

.pagination {
  list-style: none;
  margin: 20px 0;
  padding: 0;

  li {
    float: left;
    height: 32px;
    line-height: 32px;
    margin-right: 10px;
    padding: 0 4px;

    &.selected {
      padding: 0;
    }
  }
}

.progress-bar {
  background: #f3f3f3;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  height: 10px;
  position: relative;
  text-align: right;
  z-index: 1;

  &:after {
    bottom: -2px;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
  }

  &:before {
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
  }

  > div {
    background: #000;
    height: 10px;
    position: relative;
    z-index: 5;
  }
}

.progress-bar-percent {
  font-family: @ZillaSlab;
  font-size: 20px;
  text-align: right;
}

.rgba {
  .progress-bar {
    @dark: rgba(0, 0, 0, 0.03);
    border-color: @dark;
  }
}

.sidebar-header {
  color: #000;
  font-weight: bold;
  margin: 30px 0 2px 0;
  padding: 16px 20px 0 0;

  &:first-child {
    margin-top: 0;
  }
}

.sidebar-nav {
  font-family: @ZillaSlab;
  font-size: 16px;
  list-style: none;
  padding: 0;

  > li {
    position: relative;

    > span,
    > a,
    > a:visited {
      border-left: 4px solid #e7e7e7;
      color: #000;
      cursor: pointer;
      display: block;
      padding: 16px 20px;
      position: relative;
      text-decoration: none;

      &.sort-asc,
      &.sort-desc {
        &:after {
          content: '';
          display: inline-block;
          height: 0;
          margin-bottom: 2px;
          margin-left: 6px;
          width: 0;
        }
      }

      &.sort-asc {
        &:after {
          border-color: transparent transparent #000 transparent;
          border-style: solid;
          border-width: 0 6px 6px 6px;
        }
      }

      &.sort-desc {
        &:after {
          border-color: #000 transparent transparent transparent;
          border-style: solid;
          border-width: 6px 6px 0 6px;
        }
      }
    }

    > span:hover,
    > a:hover {
      color: #000;
      text-decoration: underline;
    }

    > a:active {
      text-decoration: none;
    }



    &.selected {
      > span,
      > a,
      > a:visited,
      > a:hover {
        background: #f3f3f3;
        border-color: #000;
        position: relative;
      }
    }
  }

  &.sidebar-folding {
    > li {
      border-bottom: 1px dotted @borderLightGrey;
      position: relative;

      &:after {
        display: none;
      }

      &.selected {
        > span,
        > a,
        > a:visited {
          background: @sidebarBackground url('../img/grain.png');

          &:after {
            background-position: -50px -396px;
            margin-top: -10px;
          }
        }

        > span:hover,
        > a:hover {
          background-color: @sidebarBackgroundHover;
        }

        > .sidebar-nav,
        > .folder {
          display: block;
        }
      }

      &:last-of-type {
        border: 0;
      }

      > .sidebar-nav,
      > .folder {
        display: none;
      }

      > span,
      > a,
      > a:visited {
        padding-right: 46px;

        &:after {
          background: @iconsSprite -50px -282px no-repeat;
          content: '';
          height: 16px;
          left: auto;
          margin: -8px 0 0 0;
          position: absolute;
          top: 50%;
          right: 16px;
          width: 16px;
        }
      }
    }

    &.tight {
      > li {
        > span,
        > a,
        > a:visited {
          padding-right: 46px;
        }
      }
    }

    + .products,
    + .topics {
      margin: 20px 0 0;
    }
  }

  &.condensed {
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
  }

  &.tight {
    > li {
      > span,
      > a,
      > a:visited {
        font-size: 12px;
        padding: 12px 20px;
      }
    }
  }

  .sidebar-nav {
    > li {
      > span,
      > a,
      > a:visited {
        font-size: 14px;
        padding: 10px 20px 10px 30px;
      }

      > span:hover,
      > a:hover {
        background: #fff;
      }

      &.selected {
        > a:hover {
          background-color: @sidebarBackgroundSelected;
        }
      }
    }
  }

  + .sidebar-nav {
    margin-top: 20px;
  }
}

.sidebox {
  background: @sidebarBackground url('../img/grain.png');
  color: @textDarkGrey;
  padding: 16px 20px;

  &.condensed {
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
  }

  &.tight {
    font-size: 12px;
    padding: 12px 20px;
  }

  .title {
    display: block;
    margin-bottom: 12px;
    text-transform: uppercase;
  }
}

.tab-strip {
  background: #fafafa;
  border: 1px solid #efefef;
  box-shadow: inset 0 0 0 2px #f7f7f7;
  list-style: none;
  margin: 0;
  padding: 4px 2px;
  font-size: 14px;

  > li {
    float: left;
    text-align: center;

    > a {
      border-right: 1px dotted @borderLightGrey;
      display: block;
      outline: none;
      padding: 6px 12px;
    }

    &:last-of-type {
      > a {
        border-right: 0;
      }
    }

    &.ui-state-active {
      > a {
        color: @textGrey;
        font-weight: bold;
        text-decoration: none;
      }
    }
  }
}

.quick-paginator {
  list-style: none;
  margin: 0;
  padding: 0;

  .prev {
    float: left;
  }

  .next {
    float: right;
  }
}

#aux-nav {
  font-size: 16px;
  font-weight: 700;
  position: relative;
  z-index: 10;

  > ul {
    list-style: none;
    margin: 0;
    padding: 0;

    > li {
      color: #000;
      display: inline-block;
      line-height: 1.2;
      margin: 0 20px 0 0;
      position: relative;
      text-align: left;

      > a,
      > a:visited,
      > span {
        color: #fff;
        font-weight: bold;
        height: 42px;
        line-height: 40px;
        padding: 0;
        text-decoration: none;
      }

      > a:hover {
        background-color: #000;
        color: #fff;
        text-decoration: underline;
      }

      &.dropdown {
        > a,
        > a:visited,
        > span {
          padding-right: 12px;
        }
      }
    }
  }

  .unread-message-count {
    background: @textGrey;
    border-radius: 2px;
    color: #FFFFFF;
    font-size: 78%;
    font-weight: bold;
    background: #0095dd;
    background: linear-gradient(to bottom, #0095dd, #00539f);
    left: 3px;
    padding: 2px 4px;
    position: relative;
    top: -2px;
  }

  .hidden {
    display: none;
  }

  .html-rtl & > ul > li {
    > svg {
      padding-left: 0;
      padding-right: 12px;
    }

    > a,
    > a:visited,
    > span {
      &.locale-picker {
        padding-left: 0;
        padding-right: 54px;
      }
    }
  }
}

#aux-nav-right {
  font-size: 16px;
  font-weight: 700;
  z-index: 10;

  > ul {
    list-style: none;
    margin: 0 0 0 10px;
    padding: 0;

    > li {
      color: #000;
      display: inline-block;
      vertical-align: middle;
      line-height: 1.2;
      margin: 0 20px 0 0;

      > a,
      > a:visited,
      > span {
        color: #fff;
        font-weight: bold;
        height: 42px;
        line-height: 40px;
        padding: 0 12px;
        text-decoration: none;

        &.locale-picker {
          color: #fff;
          padding-left: 10px;
          padding-right: 0;
          font-size: 18px;
          font-weight: bold;
          text-transform: uppercase;
        }

        &.user {
          padding: 0;
        }
      }

      > svg {
        fill: #fff;
        height: 22px;
        width: 22px;
        padding-left: 0;
      }

      &.lang-switcher-nav-item {
        display: inline-flex;
        align-items: center;
      }
    }
  }

  .firefox-download-button:link,
  .firefox-download-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: @buttonGreen;
    border-radius: 100px;
    border: none;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: bold;
    height: 32px;
    min-width: 170px;
    line-height: 30px;
    margin-left: 0;
    margin-top: 2px;
    padding: 5px 14px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: color .1s ease-in-out, background-color .1s ease-in-out;

    &.hidden {
      display: none;
    }

    &:hover,
    &:focus {
      background-color: saturate(darken(@buttonGreen, 5%), 10%);
    }

    &:active {
      background-color: saturate(darken(@buttonGreen, 20%), 10%);
    }
  }

  .signin-signup-button:link,
  .signin-signup-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: bold;
    height: 32px;
    padding: 5px 16px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: color .1s ease-in-out, background-color .1s ease-in-out;
    min-width: 170px;

    &:hover,
    &:focus,
    &:active {
      background-color: darken(#fff, 10%);
      color: #000;
    }

    &:active {
      background-color: darken(#fff, 30%);
    }
  }

  .hidden {
    display: none;
  }
}

#aux-nav > ul > li, #aux-nav-right > ul > li {
  &.dropdown {
    position: relative;

    @media screen and (min-width: 970px) {
      &:not(.user-dropdown):after {
        display: inline-block;
        margin: 0 0 2px -7px;
        width: 10px;
        height: 5px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.71 6.06'%3E%3Cpolyline points='0.35 0.35 5.35 5.35 10.35 0.35' fill='none' stroke='%23fff' stroke-width='2' /%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: auto 100%;
        content: "";
      }

      &:hover:before { // dropdown pip
        position: absolute;
        top: auto;
        right: 0px;
        bottom: -15px;
        left: auto;
        z-index: 2;
        width: 12px;
        height: 16px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15.6 11.2'%3E%3Cpath d='M1 8.6l5.9-7.2c.2-.2.5-.4.8-.4s.6.2.8.4l5.9 7.2s-1 2.6-6.8 2.6S1 8.6 1 8.6z' fill='%23FFF'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        content: "";
      }
    }
  }

  &.user-dropdown {
    &:hover:before {
      right: 16px;
    }

    > ul {
      right: 4px;
      left: auto;
    }
  }

  > ul {
    background: #fff;
    box-shadow: 0 0 31px -12px rgba(0,0,0,0.25);
    display: none;
    right: auto;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 12px;
    position: absolute;
    top: 50px;
    width: 160px;
    border-radius: 4px;

    &:before { // hover helper
      position: absolute;
      top: -16px;
      right: -10px;
      left: -10px;
      height: 30px;
      // background: rgba(255,0,0,0.4); // uncomment to debug
      content: "";
    }

    &.double {
      width: 400px;

      > li {
        float: left;
        width: 200px;

        &:nth-child(odd) {
          clear: left;

          > a {
            margin-right: 0;
          }
        }
      }
    }

    > li {
      font-size: 14px;
      padding: 0;

      > a,
      > a:visited {
        color: #000;
        display: block;
        text-decoration: none;
        padding: 10px 22px;
        margin: 0;

        @media screen and (min-width: 970px) {
          margin: 0 -12px;
        }
      }

      > a:hover {
        color: @textBlue;
        text-decoration: none;
        background: #f0f0f0;
      }

      > a:active {
        color: darken(@textBlue, 20%);
        text-decoration: none;
        background: transparent;
      }

      &:last-of-type {
        > a {
          border: 0;
        }
      }
    }
  }

  &:hover {
    background: #000;

    > ul {
      display: block;
      z-index: 100;
    }

    a {
      text-decoration: underline;
    }
  }
}

.html-rtl {
  #aux-nav {
    > ul {
      > li {
        padding: 0 20px 0 12px;

        &.dropdown {
          & > a:after,
          & > span:after {
            margin: 0 4px 0 0;
          }

          &:hover {
            &:before {
              left: -9px;
              right: auto;
            }
          }
        }

        & > ul {
          right: -10px;
          left: auto;
          text-align: right;

          &:after {
            right: auto;
            left: 11px;
          }
        }
      }
    }

    .unread-message-count {
      right: auto;
      left: -3px;
    }
  }
  #aux-nav-right {
    > ul {
      > li {
        padding: 0 12px 0 20px;

        &.user-dropdown {
          > ul {
            left: 10px;
            right: auto;

            &:after {
              left: 9px;
              right: auto;
            }
          }

          &:hover:before {
            right: auto;
            left: 22px;
          }
        }
      }
    }

    .unread-message-count {
      left: auto;
      right: -3px;
    }
  }
}

#product-cards {
  display: block;
  margin-left: auto;
  margin-right: auto;

  a,
  a:link,
  a:visited {
    color: @textGrey;
    display: block;
    height: auto;
    padding: 0;
    text-decoration: none;
    width: 100%;

    &:hover {
      .title {
        text-decoration: underline;
      }
    }
  }

  &.card-grid {
    margin-left: 0;
    margin-right: 0;
  }

  &.card-grid > li {
    border: 1px solid #E7E7E7;
    border-radius: 2px;
    box-shadow: inset 0 -2px 0 0 #E7E7E7;
    min-height: 240px;
    margin: 0 0 28px;
    overflow: hidden;
    padding: 0;
    width: 100%;

    &::before {
      content: none;
    }
  }

  @media screen and (min-width: 600px) {
    &.card-grid {
      margin-left: -12px;
      margin-right: -12px;

      > li {
        margin: 0 12px 28px;
        width: 40%;
        width: ~"calc(50% - 30px)";
      }
    }
  }


  @media screen and (min-width: 970px) {
    &.card-grid > li {
      width: 30%;
      width: ~"calc(33% - 26px)";
    }
  }

  .thunderbird {
    .logo-sprite {
      background-image: url('../img/icon.thunderbird.png');
    }
  }

  .icon {
    background-color: #f3f3f3;
    padding: 4px 0;

    img {
      display: block;
      height: 122px;
      margin: 0 auto;
      width: auto;
    }
  }

  .title {
    font-size: 16px;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 15px;
    font-weight: bold;
  }

  .description {
    color: #676767;
    font-size: 13px;
    padding: 10px 15px 10px 20px;
  }
}

#stage-banner {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #000;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  color: #fff;
  left: 32px;
  padding: 12px 20px 12px 30px;
  position: fixed;
  text-shadow: 1px 1px 1px #000;
  top: 32px;
  z-index: 9999;

  a,
  a:visited {
    color: #ffcc00;
  }

  .close-button {
    background: #000;
    border: 2px solid #fff;
    border-radius: 15px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    height: 24px;
    left: -8px;
    position: absolute;
    text-indent: -9999px;
    top: -8px;
    width: 24px;

    &:before {
      content: '\2715';
      font-size: 22px;
      height: 24px;
      left: 0;
      line-height: 22px;
      position: absolute;
      text-align: center;
      text-indent: 0;
      top: 0;
      width: 24px;
    }
  }
}

.simple-search-form {
  position: relative;
  display: flex;
  margin-bottom: 10px;

  .submit-button {
    background: url('../img/search-icon.png') 0 0 no-repeat;
    background-size: 17px 17px;
    border: 0;
    height: 17px;
    position: absolute;
    right: 12px;
    text-indent: -9999px;
    top: 8px;
    width: 17px;
  }

  .btn {
    white-space: nowrap;
  }

  .searchbox {
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 30px;
    color: #000;
    font-size: 14px;
    padding: 6px 42px 6px 20px;
    margin-right: 10px;
    appearance: none;
    -webkit-appearance: none;

    &:focus {
      outline: none;

      &::placeholder {
        color: #000;
      }
    }

    &::placeholder {
      color: #000;
      opacity: 1;
    }
  }
}

.html-rtl {
  #support-search {
    float: left;
  }

  .simple-search-form {
    .submit-button {
      left: 12px;
      right: auto;
    }

    .searchbox {
      padding: 6px 20px 6px 42px;
      margin: 0 0 0 10px;
    }
  }
}

#support-search {
  display: block;
  float: right;
  margin: 25px 0 0 0;

  .searchbox {
    max-width: 200px;
  }
}

.announce-bar {
  background: url('../img/warning-stripes.png') top left repeat-x #eff;
  display: none;
  font-size: 13px;
  margin-bottom: 1px;
  min-height: 30px;
  line-height: 28px;
  overflow: auto;
  position: relative;

  // This is an overlay over the background to make it fade out.
  &:before {
    background: #fff;
    bottom: 0;
    content: '';
    left: 0;
    opacity: 0.5;
    position: absolute;
    right: 0;
    top: 0;
  }

  &.info {
    background-color: #eff;
  }

  &.warn {
    background-color: #ffe;
  }

  &.error {
    background-color: #fef;
  }

  .grid_12 {
    z-index: 1;

    .close-button {
      background: @iconsSprite -50px -2022px no-repeat;
      cursor: pointer;
      float: right;
      height: 15px;
      margin-top: 7px;
      width: 15px;
      z-index: 2;
    }
  }
}

.warning-box {
  background: url('../img/warning-stripes.png') top left repeat-x #ffe;
  border: 1px solid #fffbe7;
  margin: 20px 0 20px 0;
  padding: 20px 30px 20px 30px;
  box-shadow: 0 0 4px rgba(100, 0, 0, 0.2);
}

/* Vote response message box */
.ajax-vote-box {
  background: #fff;
  border: solid 1px #ccc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  font-family: Georgia;
  font-size: 14px;
  left: 0;
  padding: 7px 20px;
  position: absolute;
  top: 0;

  &:after {
    background: #fff;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.3);
    content: '';
    display: block;
    height: 20px;
    left: 50%;
    margin-left: -20px;
    position: absolute;
    top: 20px;
    transform: rotate(45deg);
    width: 20px;
    z-index: 1;
  }

  p {
    margin: 0;
    position: relative;
    z-index: 2;
  }
}

.html-rtl {
  .ajax-vote-box {
    left: auto;
    right: 0;
  }
}

.page-not-found {
  background: url(../img/background-404.jpg) no-repeat;
  background-size: 100%;
  border-radius: 5px;
  font-size: 18px;
  line-height: 25px;
  min-height: 554px;
  padding: 10px 0;
  text-align: center;

  h1 {
    color: #fff;
    font-size: 45px;
    font-weight: 100;
    margin-bottom: 150px;
    text-shadow: #222 1px 1px 2px;
  }

  p, div.search-empty {
    background-color: rgba(256, 256, 256, 0.75);
    padding: 5px;
  }

  form {
    margin: 30px 0px;

    .search-query {
      padding: 5px;
    }

    input[type="submit"] {
      background: #3c88cc;
      background: linear-gradient(to bottom, #3c88cc, #3173ae);
      border-bottom: 2px solid #2b659a;
      color: #fff;
      font-size: 17px;
      line-height: 20px;
      padding: 5px 15px;
    }
  }
}

.footnote {
  display: inline-block;
  font-size: 12px;
  margin-top: 10px;
}

.input-dropdown {
  background: #fff;
  border: 1px solid @borderLightGrey;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  position: absolute;
  z-index: 10;

  > ul {
    > li {
      cursor: pointer;
      display: block;
      padding: 8px 5px;
      width: auto;

      &:hover {
        background: @textBlue;
        color: #fff;
      }
    }
  }
}

@media only screen and (max-device-width: 450px) {
  .mobile-banner {
    position: relative;
    width: 100%;
    font-size: 36pt;
    background: #363636;
    color: #fff;
    text-align: center;
    padding: 10pt 0;

    @close_button_size: 40pt;
    .close-button {
      background: #000;
      border: 0.5pt solid #fff;
      border-radius: 50%;
      box-shadow: 0 0 3pt rgba(0, 0, 0, 0.2);
      cursor: pointer;
      height: @close_button_size;
      width: @close_button_size;
      position: absolute;
      left: 16pt;
      bottom: 12pt;
      font-size: 0;

      &:before {
        content: '\2715';
        font-size: 36pt;
        line-height: @close_button_size;
        height: @close_button_size;
        width: @close_button_size;
        text-align: center;
        text-indent: 0;
        position: absolute;
        top: 1pt;
        left: 0;
      }
    }
  }
}

@media only screen and (min-device-width: 451px) {
  .mobile-banner {
    display: none;
  }
}

.user-messages {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;

  > li {
    box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    position: relative;

    &.info {
      background: #dde2ff;
    }

    &.success {
      background: #efe;
    }

    &.warning {
     background: url('../img/warning-stripes.png') top left repeat-x #ffe;
    }

    &.error {
      background: url('../img/warning-stripes.png') top left repeat-x #fee;
    }

    &.dismissible {
      display: none;
    }

    .close-button {
      background: @iconsSprite -50px -2022px no-repeat;
      cursor: pointer;
      height: 15px;
      position: absolute;
      right: 8px;
      top: 8px;
      width: 15px;
    }
  }
}

.choice-list {
  margin: 2em 0;

  ul {
    display: inline;
  }

  li {
    display: inline-block;
    font-weight: bold;
    list-style: none;
    padding: 0 8px;

    a {
      font-weight: normal;
    }
  }
}

.product-picker {
  position: relative;

  > div {
    margin: 20px 50px 0;
    overflow: hidden;

    > ul {
      list-style: none;
      margin: 0;
      padding: 0;

      > li {
        display: block;
        float: left;
        margin-right: 20px;
        opacity: 0.6;
        transition: opacity 0.4s;
        width: 135px;

        &:hover {
          opacity: 0.8;
        }

        &:last-of-type {
          margin-right: 0;
        }

        &.selected {
          font-weight: bold;
          opacity: 1;

          > a,
          > a:visited {
            color: #000
          }
        }

        > a,
        > a:visited {
          background: #fff;
          border: 1px solid @borderLightGrey;
          border-radius: 6px;
          box-sizing: border-box;
          color: @textDarkGrey;
          display: block;
          height: 100%;
          padding: 10px;
          text-align: center;

          > span {
            display: block;
          }

          > .logo-sprite {
            margin: 0 10px;
          }
        }

        > a:hover {
          text-decoration: none;
        }
      }
    }
  }

  > .left,
  > .right {
    background-image: url('../img/carousel-arrow-sprite.png');
    background-repeat: no-repeat;
    bottom: 0;
    cursor: pointer;
    position: absolute;
    top: 0;
    width: 50px;
  }

  > .left {
    background-position: -50px center;
    left: 0;
  }

  > .right {
    background-position: -200px center;
    right: 0;
  }
}

.product-picker-dd {
  margin: 24px 0 0 0;
  position: relative;
  z-index: 8;

  > ul {
    background: #fff;
    border: 1px solid @borderLightGrey;
    box-sizing: border-box;
    display: none;
    list-style: none;
    margin: 0;
    max-height: 258px;
    overflow: auto;
    padding: 0;
    position: absolute;
    top: 100%;
    width: 100%;

    > li {
      height: 64px;

      > a,
      > a:visited {
        color: @textDarkGrey;
        display: block;
        font-size: 24px;
        height: 100%;
        line-height: 62px;
        padding: 0 0 0 64px;
        position: relative;

        .logo-sprite {
          left: 7px;
          margin-top: -24px;
          position: absolute;
          top: 50%;
        }
      }

      > a:hover {
        background: #e8e8e8;
        text-decoration: none;
      }

      &.selected {
        > a {
          background: @textBlue;
          color: #fff;
        }
      }
    }
  }

  &:hover {
    transition-delay: 250ms;

    > ul {
      display: block;
    }
  }

  .current {
    background: #fff;
    border: 1px solid @borderLightGrey;
    border-radius: 12px;
    box-shadow: 0 -2px 0 #d0d0d0 inset;
    font-size: 24px;
    height: 64px;
    line-height: 60px;
    padding: 0 0 0 62px;
    position: relative;

    .logo-sprite {
      left: 7px;
      margin-top: -24px;
      position: absolute;
      top: 50%;
    }
  }

  .dd-btn {
    background: #e8e8e8;
    background: linear-gradient(to bottom, #e8e8e8, @borderLightGrey);
    border-radius: 6px;
    float: right;
    height: 50px;
    margin: 6px;
    position: relative;
    width: 62px;

    > img {
      left: 50%;
      margin: -9px 0 0 -20px;
      position: absolute;
      top: 50%;
    }
  }
}

#nav-access {
  background: #fff;
  margin: 0;
  padding: 0;
  position: absolute;
  top: -20em;
  width: 100%;
  z-index: 1001;

  a {
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 10px;
    position: absolute;
    left: 0;
    right: 0;
    font-weight: bold;
    text-align: center;
    padding: 0;
    margin: 0;

    &:focus {
      top: 20em;
      text-decoration: none;
    }
  }
}

#sg-popup {
  background: #ffffff;
  border: 1px solid #000000;
  font-size: 16px;
  left: 400px;
  padding: 20px;
  position: absolute;
  top: 100px;
  width: 500px;
  z-index: 1000;
}

/* Survey Gizmo bottom bar */
.sg-b-bar {
  box-shadow: 0px -3px 3px rgba(0, 0, 0, 0.1);
}

.html-rtl {
  > .breadcrumbs {
    > .container_12 {
      > #breadcrumbs {
        > li {
          float: right;
        }
        > li:before {
          margin: 0px 0px 0px 6px;
        }
      }
    }
  }
}
.html-rtl {
  .container_12 {
    .grid_12 {
       #product-cards {
         .logo-sprite {
           float: right;
         }
         .title {
           text-align: right;
           margin: 0px 0px 50px 0px;
         }
         .description {
           text-align: right;
           margin: -37px 0px 0px 0px;
         }
       }
       #help-topics {
         .card-grid {
           & > li {
             & > a {
               .title {
                 text-align: left;
                 margin-left: 0px;
               }
             }
           }
         }
       }
       h1.product-title {
         .logo-sprite {
           float: right;
         }
       }
    }
  }
}
.html-rtl {
  .container_12 {
    .grid_9 {
      .logo-sprite {
        float: right;
      }
    }
  }
}
.html-rtl {
  .grid_12 {
    .hero-bar {
      .column {
        float: right;
      }
      .hero-butler {
        right: 510px;
      }
    }
    .hero-bar.secondary {
      background-position: 0px;
    }
  }
}
.html-rtl {
  #aux-nav,
  #aux-nav-right {
    > ul {
      > li {
        padding: 0px;
      }
    }
  }
}
/* bug1441583 experiment-fxa-cta-topbar */
#promotions {
  background: #003eaa;
  background: linear-gradient(148deg,#c7216a 7%,#fda41e 100%);
  height: 28px;
  color: #fff;
  text-align: center;
  font-size: 1.25em;
  padding: 3px 0;
  a {
    color: #fff;
    margin-left: 10px;
  }
  a:hover {
    text-decoration: underline;
  }
  a:before {
    content: "»\a0";
    font-family: 'Open Sans Light',X-LocaleSpecific-Light,'Open Sans',X-LocaleSpecific,sans-serif;
    font-weight: 400;
  }
}
.hidden {
  display: none;
}
/* end bug1441583 */

.search-form-large {
  margin: 0 auto;
  max-width: 960px;

  .simple-search-form {
    display: block;
    float: none;
    margin: 30px 0 30px 0;
    text-align: center;

    .searchbox {
      background: #fff;
      border: 2px solid #cbcbcb;
      border-radius: 8px;
      color: #000;
      font-size: 16px;
      height: 60px;
      padding: 0 54px 0 20px;
      width: 100%;
      box-sizing: border-box;

      &::placeholder {
        color: #000;
      }
    }

    .submit-button {
      background-size: 24px 24px;
      height: 24px;
      right: 20px;
      width: 24px;
      top: 20px;
    }
  }

  #support-search-product {
    .html-rtl & .submit-button {
      left: 20px;
      right: auto;
    }
  }

  .html-rtl & .simple-search-form .submit-button {
    left: 20px;
    right: auto;
  }
}

.support-search-main {
  display: none;
  max-width: 960px;
  margin: 10px auto 0;
}

#instant-search-content {
  max-width: 960px;
  margin: 0 auto;
}

.dropdown .user,
.dropdown .user span {
  display: inline-flex;
  align-items: center;
  font-size: 16px;

  &.hide-on-mobile {
    font-weight: bold;
  }

  .avatar {
    border-radius: 50%;
    margin: 0 4px 0 10px;
    max-width: 36px;
  }
}

.light-grey-bg {
  background: #fbfbfc;

  .content {
    border-radius: 6px;
    box-shadow: 0 23px 92px -20px rgba(138, 150, 155, 0.5);
    background-color: #fff;
    display: flex;
    padding: 20px 0;
  }
}

.large-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;

  .ff-logo {
    width: 100%;
    max-width: 300px;
    margin-left: 30px;
  }
}

.login-submit {
  border-bottom:  2px solid #000;
  padding: 1.1rem 0 0 0;
  text-align: center;
  margin-bottom: 1.1rem;

  .button-wrap .button {
    width: 100%;
  }

  @media screen and (min-width: 970px) {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 0;

    .button-wrap {
      margin-right: 44px;

      .button {
        white-space: nowrap;
        width: auto;
      }
    }
  }
}

.help-text {
  font-size: 14px;
}

.mt-0 { margin-top: 0 !important;}
.mb-0 { margin-bottom: 0 !important;}

.clear-floats {
  clear: both;
}

@media screen and (max-width: 969px) {
  .hide-on-mobile {
    display: none !important;
  }
}

@media screen and (min-width: 970px) {
  .mobile-only {
    display: none !important;
  }
}

img { // reduce size of alt tags on broken images
  font-size: 12px;
  line-height: 1.2;
}

@import 'buttons.less';
@import 'responsive-patch.less';
